import java.util.Locale;
import java.util.Scanner;
public class demo1 {
    public static int add(int a, int b) {
        if(b==0)
            return a;
        int sum = a^b;
        int carry =(a&b)<<1;
        return add(sum,carry);
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int a=scanner.nextInt();
        int b=scanner.nextInt();
        System.out.println(add(a,b));
    }
}
